/**
 *
 */
package uy.edu.um.taller2;

import javax.swing.table.AbstractTableModel;

/**
 * @author pegardan
 *
 */
public class ClientsTableModel extends AbstractTableModel {

	private String [] columns = {"Nombre", "Apellido", "Sexo"};

	private String[][] data = {
			{"Daniel", "Pereda", "Masculino"},
			{"Gimena", "Lopez", "Femenino"}};

	/* (non-Javadoc)
	 * @see javax.swing.table.TableModel#getColumnCount()
	 */
	public int getColumnCount() {
		return columns.length;
	}

	/* (non-Javadoc)
	 * @see javax.swing.table.TableModel#getRowCount()
	 */
	public int getRowCount() {
		return data.length;
	}

	/* (non-Javadoc)
	 * @see javax.swing.table.TableModel#getValueAt(int, int)
	 */
	public Object getValueAt(int rowIndex, int columnIndex) {

		return data[rowIndex][columnIndex];
	}


	@Override
	public String getColumnName(int column) {
		return columns[column];
	}

}
